Integrand size = 17, antiderivative size = 98 \[ \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=-\frac {b^2 n^2}{4 \left (1+b^2 n^2\right ) x^2}-\frac {b n \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}-\frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2} \]
-1/4*b^2*n^2/(b^2*n^2+1)/x^2-1/2*b*n*cos(a+b*ln(c*x^n))*sin(a+b*ln(c*x^n)) /(b^2*n^2+1)/x^2-1/2*sin(a+b*ln(c*x^n))^2/(b^2*n^2+1)/x^2
Time = 0.09 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.59 \[ \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=-\frac {1+b^2 n^2-\cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+b n \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )}{4 \left (1+b^2 n^2\right ) x^2} \]
-1/4*(1 + b^2*n^2 - Cos[2*(a + b*Log[c*x^n])] + b*n*Sin[2*(a + b*Log[c*x^n ])])/((1 + b^2*n^2)*x^2)
Time = 0.22 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4990, 15}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx\) |
\(\Big \downarrow \) 4990 |
\(\displaystyle \frac {b^2 n^2 \int \frac {1}{x^3}dx}{2 \left (b^2 n^2+1\right )}-\frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac {b n \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle -\frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac {b n \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac {b^2 n^2}{4 x^2 \left (b^2 n^2+1\right )}\) |
-1/4*(b^2*n^2)/((1 + b^2*n^2)*x^2) - (b*n*Cos[a + b*Log[c*x^n]]*Sin[a + b* Log[c*x^n]])/(2*(1 + b^2*n^2)*x^2) - Sin[a + b*Log[c*x^n]]^2/(2*(1 + b^2*n ^2)*x^2)
3.1.12.3.1 Defintions of rubi rules used
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_ ), x_Symbol] :> Simp[(m + 1)*(e*x)^(m + 1)*(Sin[d*(a + b*Log[c*x^n])]^p/(b^ 2*d^2*e*n^2*p^2 + e*(m + 1)^2)), x] + (-Simp[b*d*n*p*(e*x)^(m + 1)*Cos[d*(a + b*Log[c*x^n])]*(Sin[d*(a + b*Log[c*x^n])]^(p - 1)/(b^2*d^2*e*n^2*p^2 + e *(m + 1)^2)), x] + Simp[b^2*d^2*n^2*p*((p - 1)/(b^2*d^2*n^2*p^2 + (m + 1)^2 )) Int[(e*x)^m*Sin[d*(a + b*Log[c*x^n])]^(p - 2), x], x]) /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 1] && NeQ[b^2*d^2*n^2*p^2 + (m + 1)^2, 0]
Time = 2.13 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.60
method | result | size |
parallelrisch | \(\frac {-b^{2} n^{2}-b n \sin \left (2 b \ln \left (c \,x^{n}\right )+2 a \right )+\cos \left (2 b \ln \left (c \,x^{n}\right )+2 a \right )-1}{4 x^{2} \left (b^{2} n^{2}+1\right )}\) | \(59\) |
Time = 0.25 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.70 \[ \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=-\frac {b^{2} n^{2} + 2 \, b n \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) - 2 \, \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + 2}{4 \, {\left (b^{2} n^{2} + 1\right )} x^{2}} \]
-1/4*(b^2*n^2 + 2*b*n*cos(b*n*log(x) + b*log(c) + a)*sin(b*n*log(x) + b*lo g(c) + a) - 2*cos(b*n*log(x) + b*log(c) + a)^2 + 2)/((b^2*n^2 + 1)*x^2)
Result contains complex when optimal does not.
Time = 2.44 (sec) , antiderivative size = 468, normalized size of antiderivative = 4.78 \[ \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=\begin {cases} - \frac {3 i \sin {\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )} \cos {\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{4 x^{2}} - \frac {\cos ^{2}{\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 x^{2}} + \frac {\log {\left (c x^{n} \right )} \sin ^{2}{\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{4 n x^{2}} - \frac {i \log {\left (c x^{n} \right )} \sin {\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )} \cos {\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x^{2}} - \frac {\log {\left (c x^{n} \right )} \cos ^{2}{\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{4 n x^{2}} & \text {for}\: b = - \frac {i}{n} \\- \frac {\sin ^{2}{\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 x^{2}} - \frac {i \sin {\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )} \cos {\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{4 x^{2}} + \frac {\log {\left (c x^{n} \right )} \sin ^{2}{\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{4 n x^{2}} + \frac {i \log {\left (c x^{n} \right )} \sin {\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )} \cos {\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x^{2}} - \frac {\log {\left (c x^{n} \right )} \cos ^{2}{\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{4 n x^{2}} & \text {for}\: b = \frac {i}{n} \\- \frac {b^{2} n^{2} \sin ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} n^{2} x^{2} + 4 x^{2}} - \frac {b^{2} n^{2} \cos ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} n^{2} x^{2} + 4 x^{2}} - \frac {2 b n \sin {\left (a + b \log {\left (c x^{n} \right )} \right )} \cos {\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} n^{2} x^{2} + 4 x^{2}} - \frac {2 \sin ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} n^{2} x^{2} + 4 x^{2}} & \text {otherwise} \end {cases} \]
Piecewise((-3*I*sin(a - I*log(c*x**n)/n)*cos(a - I*log(c*x**n)/n)/(4*x**2) - cos(a - I*log(c*x**n)/n)**2/(2*x**2) + log(c*x**n)*sin(a - I*log(c*x**n )/n)**2/(4*n*x**2) - I*log(c*x**n)*sin(a - I*log(c*x**n)/n)*cos(a - I*log( c*x**n)/n)/(2*n*x**2) - log(c*x**n)*cos(a - I*log(c*x**n)/n)**2/(4*n*x**2) , Eq(b, -I/n)), (-sin(a + I*log(c*x**n)/n)**2/(2*x**2) - I*sin(a + I*log(c *x**n)/n)*cos(a + I*log(c*x**n)/n)/(4*x**2) + log(c*x**n)*sin(a + I*log(c* x**n)/n)**2/(4*n*x**2) + I*log(c*x**n)*sin(a + I*log(c*x**n)/n)*cos(a + I* log(c*x**n)/n)/(2*n*x**2) - log(c*x**n)*cos(a + I*log(c*x**n)/n)**2/(4*n*x **2), Eq(b, I/n)), (-b**2*n**2*sin(a + b*log(c*x**n))**2/(4*b**2*n**2*x**2 + 4*x**2) - b**2*n**2*cos(a + b*log(c*x**n))**2/(4*b**2*n**2*x**2 + 4*x** 2) - 2*b*n*sin(a + b*log(c*x**n))*cos(a + b*log(c*x**n))/(4*b**2*n**2*x**2 + 4*x**2) - 2*sin(a + b*log(c*x**n))**2/(4*b**2*n**2*x**2 + 4*x**2), True ))
Leaf count of result is larger than twice the leaf count of optimal. 280 vs. \(2 (92) = 184\).
Time = 0.23 (sec) , antiderivative size = 280, normalized size of antiderivative = 2.86 \[ \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=-\frac {2 \, {\left (b^{2} \cos \left (2 \, b \log \left (c\right )\right )^{2} + b^{2} \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} n^{2} + 2 \, \cos \left (2 \, b \log \left (c\right )\right )^{2} + {\left ({\left (b \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (4 \, b \log \left (c\right )\right ) - b \cos \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + b \sin \left (2 \, b \log \left (c\right )\right )\right )} n - \cos \left (4 \, b \log \left (c\right )\right ) \cos \left (2 \, b \log \left (c\right )\right ) - \sin \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - \cos \left (2 \, b \log \left (c\right )\right )\right )} \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) + 2 \, \sin \left (2 \, b \log \left (c\right )\right )^{2} + {\left ({\left (b \cos \left (4 \, b \log \left (c\right )\right ) \cos \left (2 \, b \log \left (c\right )\right ) + b \sin \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + b \cos \left (2 \, b \log \left (c\right )\right )\right )} n + \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (4 \, b \log \left (c\right )\right ) - \cos \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + \sin \left (2 \, b \log \left (c\right )\right )\right )} \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )}{8 \, {\left ({\left (b^{2} \cos \left (2 \, b \log \left (c\right )\right )^{2} + b^{2} \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} n^{2} + \cos \left (2 \, b \log \left (c\right )\right )^{2} + \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} x^{2}} \]
-1/8*(2*(b^2*cos(2*b*log(c))^2 + b^2*sin(2*b*log(c))^2)*n^2 + 2*cos(2*b*lo g(c))^2 + ((b*cos(2*b*log(c))*sin(4*b*log(c)) - b*cos(4*b*log(c))*sin(2*b* log(c)) + b*sin(2*b*log(c)))*n - cos(4*b*log(c))*cos(2*b*log(c)) - sin(4*b *log(c))*sin(2*b*log(c)) - cos(2*b*log(c)))*cos(2*b*log(x^n) + 2*a) + 2*si n(2*b*log(c))^2 + ((b*cos(4*b*log(c))*cos(2*b*log(c)) + b*sin(4*b*log(c))* sin(2*b*log(c)) + b*cos(2*b*log(c)))*n + cos(2*b*log(c))*sin(4*b*log(c)) - cos(4*b*log(c))*sin(2*b*log(c)) + sin(2*b*log(c)))*sin(2*b*log(x^n) + 2*a ))/(((b^2*cos(2*b*log(c))^2 + b^2*sin(2*b*log(c))^2)*n^2 + cos(2*b*log(c)) ^2 + sin(2*b*log(c))^2)*x^2)
\[ \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=\int { \frac {\sin \left (b \log \left (c x^{n}\right ) + a\right )^{2}}{x^{3}} \,d x } \]
Timed out. \[ \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx=\int \frac {{\sin \left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^3} \,d x \]